<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>list</title>
</head>
<body>
        <h1>当前是第<span id="num">1</span>页</h1>
        <a id="a1" href="list.html?a=1"></a>
        <a href="list.html?a=1"></a>
        <a href="list.html?a=1"></a>
        <a href="list.html?a=1"></a>
        <a href="list.html?a=1"></a>
        <script>
            window.onload = function () {
                var nowPage = getParam('?', location.href);   //根据地址获得当前的a=几的数字
                document.getElementById('num').innerHTML = nowPage;   //将数字放到<span>标签中
                var anchorS = document.getElementsByTagName('a');   //获取所有的a标签，HtmlCollection对象，是一个集合，可以像数组一样遍历
                for(var i = 0,len=anchorS.length;i<len;i++) {
                    
                }
            }
        </script>
</body>
</html>